/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ProjetoEngenharia.DAO;

/**
 *
 * @author Felipe Freitas Gomes
 */
import java.sql.*;
import javax.swing.JOptionPane;

public class FabricaConexao {

    public static Connection GeraConexao() {
        Connection Conexao = null;
        try {

            String URL = "jdbc:mysql://localhost/bd_felipe";
            String usuario = "root";
            String senha = "root";

            Conexao = (Connection) DriverManager.getConnection(URL, usuario, senha);
            System.out.println("Conectou");

        } catch (SQLException e) {
            System.out.println("Erro ao conectar no banco de dados: " + e.getMessage());
        }
        return Conexao;
    }
}

